package com.lqq.designPattern.design_principle.迪米特法制;

//经纪人
public class Agent {
    private Star star;
    private Company company;
    private Fans fans;

    public void setStar(Star star) {
        this.star = star;
    }

    public void setFans(Fans fans) {
        this.fans = fans;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    //明星和粉丝见面会
    public void meeting() {
        System.out.println(this.star.getName() + "和粉丝" + this.fans.getName() + "见面");
    }

    //明星和媒体公司洽谈业务
    public void business() {
        System.out.println(this.star.getName() + "和媒体公司" + this.company.getName() + "洽谈业务");
    }
}
